import request from "@/utils/request";

// 查询用户会员列表
export function listRule(query) {
  return request({
    url: "/admin/rule/selectPage",
    method: "get",
    params: query,
  });
}

// 查询用户会员详细
export function getRule(id) {
  return request({
    url: "/system/rule/" + id,
    method: "get",
  });
}

// 新增用户会员
export function addRule(data) {
  return request({
    url: "/admin/rule/saveUserMember",
    method: "post",
    data: data,
  });
}

// 修改用户会员
export function updateRule(data) {
  return request({
    url: "/system/rule",
    method: "put",
    data: data,
  });
}

// 删除用户会员
export function delRule(id) {
  return request({
    url: "/system/rule/" + id,
    method: "delete",
  });
}

/**会员列表 选择推荐人 */
export function selectPageList(params) {
  return request({
    url: "/admin/rule/selectPageList",
    method: "get",
    params,
  });
}
